<template>
  <div class="header">
      <div class="header-left">
          <div class="iconfont back-icon">&#xe658;</div>
      </div>
      <div class="header-input">
          <span class="iconfont">&#xe63c;</span>
          输入城市/景点/游玩
      </div>
     <router-link to="/city">
          <div class="header-right">
            {{this.city}}
            <span class="iconfont arrow-icon">&#xe65c;</span>
        </div>
     </router-link>
  </div>
</template>

<script type="text/javascript">
import {mapState} from 'vuex'
export default {
  name:'HomeHeader',
  computed :{
    ...mapState(['city'])
  }
}
</script>


<style lang="stylus" scoped>
// 1rem = html font-size  = 50px
// 86/100

// @import  '../../../assets/styles/varibles.styl';
@import  '~styles/varibles.styl';
 .header
    color #fff
    display: flex
    height: $headerHeight
    line-height:$headerHeight
    background: $bgColor
    .header-left
        width: .64rem
        float: left
        .back-icon
            text-align: center
            font-size: .5rem
    .header-input
        color: #ccc
        flex: 1
        height: .62rem
        line-height: .62rem
        background: #fff
        border-radius: .1rem
        margin:.12rem  0 .12rem .2rem;
        padding-left:.2rem
    .header-right
        color :#fff
        text-align: center
        min-width: 1.04rem
        padding 0   .1rem
        float: right
        .arrow-icon
            font-size: 0.3rem;
            display: inline-block;
            vertical-align: middle;
            margin: -.04rem 0 0 0;

</style>
